package com.micronaut.cloud.controller;

import com.micronaut.cloud.common.ResultVO;
import com.micronaut.cloud.manager.UserInfoManager;
import com.micronaut.cloud.model.entity.UserInfo;
import com.micronaut.cloud.repository.UserInfoRepository;

import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
import io.micronaut.http.annotation.PathVariable;
import jakarta.inject.Inject;

@Controller("userInfo")
public class UserInfoController {
    @Inject
    private UserInfoManager userInfoManager;

    @Get(uri = "userInfo/{id}")
    public ResultVO<UserInfo> userInfo(@PathVariable Long id) {
        return ResultVO.success(userInfoManager.findById(id));
    }
}
